package com.dxx.cloud.admin.module.request;

import com.dxx.cloud.admin.constant.CommonConst;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author duh
 * @create 2018/12/28 14:10

 **/
@Schema(description = "添加客户存款请求体")
@Data
public class CustomerDepositAddRequest {
    @Schema(description = "商户id", example = "1")
    @NotNull
    private Long merId;

    @Schema(description = "门店id", example = "1")
    @NotNull
    private Long shopId;

    @Schema(description="用户id",example="1")
    @NotNull
    private Integer userId;

    @Schema(description="客户id",example="1")
    @NotNull
    private Integer customerId;

    @Schema(description="存款金额",example="100")
    @Min(0)
    private BigDecimal account;

    @Schema(description="商户主动扫码时，扫出的客户付款id")
    private String authCode;

    @Schema(description="支付类型:1现金 2欠账 3银行卡 4其他 5存款 11门店微信二维码 12微信客户主扫 13微信客户被扫 14微信刷脸 21门店支付宝二维码 22支付宝客户扫商户 23支付宝商户扫客户 31易收宝客户扫商户 32易收宝商户扫客户")
    private Integer payType;

    @JsonIgnore
    @Schema(description="金额变化原因 1 存款 2销账")
    private Integer changeType;

    @Schema(description="支付状态 0未支付 1发起支付 2已支付 3支付超时",example="1")
    private Integer payStatus;

    @Schema(description="存款时间,格式yyyy-MM-dd HH:mm:ss",example="admin")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date created;

    @Schema(description="时区",example = "8")
    @Min(-12)
    @Max(12)
    private Integer timeArea = CommonConst.DEFAULT_TIME_AREA;

    @Schema(description="操作者",example="admin")
    private String operator;


}
